A. Field of the Invention
The present invention relates generally to programmable devices and, more particularly, to systems and methods for configuring programmable devices.
B. Description of Related Art
Systems often use programmable logic devices that require configuration. Before the device is configured, it cannot perform its intended function. If a processor accesses resources in this logic device before it has been fully configured, the processor access may fail. Many problems can occur if this happens.
Conventional systems typically wait some period of time to allow the programmable logic device to fully configure. This technique, however, is difficult to implement correctly, and does not cover the case where the configuration of the logic device fails.
Therefore, there exists a need for systems and methods that improve logic device configuration.
Systems and methods, consistent with the present invention, address this and other needs by providing a configuration controller that holds a processor in a reset mode while a programmable device is being configured. The processor may determine the status/success of the configuration operation by accessing a configuration controller. This prevents the processor from accessing a non-configured programmable device.
In accordance with the purpose of the invention as embodied and broadly described herein, a method that configures a programmable device is disclosed. The method includes setting a processor into a reset mode, configuring the programmable device using first configuration data, and determining whether the configuring using the first configuration data is successful. When the configuring using the first configuration data is unsuccessful, the method configures the programmable device using second configuration data and determines whether the configuring using the second configuration data is successful. The method releases the processor from the reset mode when the programmable device is successfully configured using the first or second configuration data or when the configuring using the second configuration data fails.
In another implementation consistent with the present invention, a method that configures a programmable device is provided. The method includes receiving a configuration command from a processor, configuring the programmable device in response to receiving the configuration command, and setting a flag that indicates whether the programmable device is successfully configured. The flag allows for a configuration status of the programmable device to be determined without having to access the programmable device.
In yet another implementation consistent with the present invention, a network device includes a programmable device, a configuration controller, and a processor. The configuration controller receives a configuration command, configures the programmable device in response to receiving the configuration command, and sets a flag indicating the status of the configuring operation. The processor transmits the configuration command and verifies the status of the configuring by reading the flag set by the configuration controller.